package com.hongmeng.customer.service.Impl;

import com.hongmeng.common.core.domain.AjaxResult;
import com.hongmeng.common.core.domain.entity.SysUser;
import com.hongmeng.common.core.domain.model.LoginUser;
import com.hongmeng.common.utils.SecurityUtils;
import com.hongmeng.customer.service.IHmCustomerManageService;
import com.hongmeng.operater.domain.operaterUser.HmCustomer;
import com.hongmeng.operater.mapper.operaterUser.HmCustomerExtMapper;
import com.hongmeng.operater.mapper.operaterUser.HmCustomerMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 企业信息Service业务层处理
 * 
 * @author hongmeng
 * @date 2021-01-18
 */
@Slf4j
@Service
public class HmCustomerManageServiceImpl implements IHmCustomerManageService
{
    @Autowired
    private HmCustomerMapper customerMapper;

    @Autowired
    private HmCustomerExtMapper customerExtMapper;

    @Override
    public AjaxResult selectCustomerInfo() {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        HmCustomer customer = customerExtMapper.selectCustomerByNo(user.getUserName());
        return AjaxResult.success(customer);
    }
}
